package org.example.pojo;

import java.util.List;

/**
 * ClassName: Customer
 * Package: org.example.mybatis.pojo
 * Description:
 *
 * @Author wanghao
 * @Create 2024-06-28 20:45
 * @Version 1.0
 */
public class Customer {

    private Integer id;
    private String name;

    // 对多关联
    private List<OrderBean> orderBeanList;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<OrderBean> getOrderBeanList() {
        return orderBeanList;
    }

    public void setOrderBeanList(List<OrderBean> orderBeanList) {
        this.orderBeanList = orderBeanList;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", orderBeanList=" + orderBeanList +
                '}';
    }
}


/*
一对多分成两部分
1. 对一
2. 对多
 */